// 同一管理咱们项目用户相关的接口
import request from "@/utils/request";
import type { addRoleResponseData, getRoleListResponseData, roleInforDate } from "./type";
// @ts-ignore
enum API{
    ROLE_LIST_URL="/manage/role/list",
    ADD_ROLE_URL="/manage/role/add",
    UPDATE_ROLE_URL="/manage/role/update"
}

export const reqRoleList = ()=>request.get<any,getRoleListResponseData>(API.ROLE_LIST_URL)
export const reqAddRole = (data:roleInforDate)=>request.post<any,addRoleResponseData>(API.ADD_ROLE_URL,data)
export const reqUpdateRole = (data:roleInforDate)=>request.post<any,addRoleResponseData>(API.UPDATE_ROLE_URL,data)